package com.xyzwps.paimon.furina.infra

import org.redisson.Redisson
import org.redisson.api.RedissonClient
import org.redisson.client.codec.Codec

fun <V> RedissonClient.getEBucket(name: String, codec: Codec): EnchantedRBucket<V> {
    if (this is Redisson) {
        return EnchantedRBucket(this.commandExecutor, name, codec)
    }
    throw UnsupportedOperationException()
}